import React from 'react'

export default function TableInfo(props) {
    return (
        <div>
            {
                props.list.map(item => (
                    <div className='tr' key={item.name} style={{ color: item.stocked ? '' : 'red' }}>
                        <div className='td'>{item.name}</div>
                        <div className='td'>{item.price}</div>
                    </div>
                ))}
        </div>
    )
}
